
import { RouteRecordRaw } from "vue-router";
import HomeView from '../pages/homeView.vue'
import ChatGPTView from '../pages/ChatGPTView.vue'
import managerView from '../pages/managerView.vue'
import doctorView from '../pages/doctorView.vue'
import BookView from '../pages/bookView.vue'
import BooKer from '../components/BooKer.vue'
import BookMsg from "@/components/BookMsg.vue"
import JiaoFei from "@/components/JiaoFei.vue";
import treatMent from "@/components/treatMent.vue";
export const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        // 配置登录路由
        path: '/login',
        name: 'login',
        component: () => import('../views/LoginView.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('../views/RegisterView.vue')
    },
    {
        path: '/doctor',
        name: '医生页面',
        component: doctorView,
        redirect: '/doctor/info',
        children: [
            {
                path: 'info',
                name: '医生个人信息',
                component: () => import('../components/UserInfo.vue')
            },
            {
                path: 'aInfo',
                name: '预约信息',
                component: () => import('../components/aptInfo.vue')
            },
            {
                path:'treatMent',
                name:'就诊',
                component:treatMent
            },
            {
                path: 'aptHistory',
                name: '诊断历史',
                component: () => import('../components/aptHistory.vue')
            },
            {
                path:'checkMedicine',
                name:'药品库存查看',
                component:()=>import('../components/checkMedicine.vue')
            },
            {
                path:'storageMedicine',
                name:'药品入库登记',
                component:()=>import('../components/storageMedicine.vue')
            }
        ]
    },
    {
        path: '/cacHospitel',
        children: [
            {
                path: 'bookView',
                name: '预约',
                component: BookView,
                children: [{
                    path: 'book',
                    component: BooKer
                },
                {
                    path: 'bookmsg',
                    component: BookMsg
                }
                ],
            },
            {
                path:'jiaoFei',
                name:'缴费',
                component:JiaoFei
            },
            {
                path: 'ChatGPTView',
                name: '在线智能问诊',
                component: ChatGPTView
            },
            {
                path: 'managerView',
                name: '后台管理',
                component: managerView
            },
            {
                path: '/about',
                name: 'about',
                // route level code-splitting
                // this generates a separate chunk (about.[hash].js) for this route
                // which is lazy-loaded when the route is visited.
                component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
            },
        ]
    },
];
